import * as ip from '../api/ip'
export function imgIp (src) {
  return ip.imgIp + src
}
export function advIp (src) {
  return ip.advIp + src
}
export function coverIp (src) {
  return ip.coverIp + src
}
export function couponIp (src) {
  return ip.couponIp + src
}
export function special (src) {
  return ip.special + src
}
export function sliceArr (banner, index) {
  if (index === 'top') {
    return banner[0]
  } else if (index === 'last') {
    return banner[banner.length - 1]
  } else {
    return banner[index]
  }
}
export function deleverType (type) {
  var html = ''
  switch (type) {
    case '1':
      html = '已录单'
    break
    case '2':
      html = '等待确认'
    break
    case '3':
      html = '等待送货'
    break
    case '4':
      html = '等待自提'
    break
    case '5':
      html = '物业送货中'
    break
    case '6':
      html = '已收货'
    break
  }
  return html
}

export function productLink (id) {
  return 'http://wechat.zh28.com/index.php?s=/Home/Index/items/id/' + id + '.html'
}
